<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>单位信息维护</title>
<link rel="stylesheet" href="<%=path%>/css/bootstrap.min.css" />
<link rel="stylesheet" href="<%=path%>/css/easyui.css" />
<link rel="stylesheet" href="<%=path%>/css/icon.css" />
<script src="<%=path %>/js/jquery1.12.4.min.js"></script>
<style>
body {
	background-color: #f1f1f1;
}

.lightBg {
	background-color: #fff;
	padding: 5px 20px;
}
table{
/* 	border:solid 1px black;
 */}
td{
/*  border:solid 1px black; 
 */	height:50px;
	width:50px;
	text-align: left;
}
}
</style>
</head>
<body>

	<div class="container">
		<div class="row lightBg">
			<!--标题-->
			<h2 class="pull-left">
				<img src="<%=path%>/images/logo.png" style="width: 80px;">
				智游科技项目申报单位信息显示
			</h2>
		</div>
	</div>
	<div class="row" style="margin-top: 20px;" align="center">
		<div style="background-color: #fff;padding: 20px;">
			<span style="color: gray" >单位信息</span><hr>
			<table title="项目信息" style="height: 150px; width: 50%">
				<tr>
					<td>单位名称：<label>${company.CName}</label></td>
					<td><img src="<%=path %>/easyUI/themes/icons/search.png" /><a href="javascript:check()" >查看PDF文件</a></td>
				</tr>
				<script>
				
				function check(){
					window.location="checkPDFOnline";
				}
				</script>
				<tr>
					<td>组织结构码:<label>${company.login.LId}</label></td>
				</tr>
				<tr>
					<td align="left">上级主管单位:<label>${company.CUpmgr}</label>
					</td>
					<td>单位性质：<label>${company.CType}</label></td>
				</tr>
				<tr>
					<td align="left">注册资本:<label>${company.CRegmoney}</label>
					</td>
					<td>注册时间：<label>${company.CRegtime}</label></td>
				</tr>
				<tr>
					<td colspan="2" align="center" style="color: gray;text-align: center" >*要修改以上信息,请联系系统管理员</label>
					</td>
				</tr>
				</table>
				
				<table title="项目信息" style="border:solid 1px gray; margin-top:30px; height: 80px; width: 50%">
				<!-- 可修改但需要跳转的地址 -->
				<tr>
					<td>管理员姓名:<label>${company.CAdmin}</label></td>
					<td align="left">管理员电子邮箱:<label>${company.CAdEmail}</label>
					</td>
				</tr>
				<tr>
					<td>管理员联系电话：<label>${company.CAdTel}</label></td>
					<td><img src="<%=path %>/easyUI/themes/icons/pencil.png" ><a href="toCompanyManagerInfo" >前往修改管理员信息</a></td>
				</tr>
				</table>
				
				<!-- 可修改内容 -->
		<form id="companyInfo" >
				<table title="项目信息" style="margin-top:30px;height: 200px; width: 50%">
				<tr>
					<td align="left">单位地址:<input type="text" name="CAddress" value="${company.CAddress}" />
					</td>
					<td>邮政编码：<input type="text" name="CPostcode" value="${company.CPostcode}" /></td>
				</tr>
				<tr>
					<td align="left">单位电话:<input type="text" name="CTel" value="${company.CTel}" />
					</td>
					<td>单位传真：<input type="text" name="CFax" value="${company.CFax}" /></td>
				</tr>
				<tr>
					<td align="left">单位网址:<input type="text" name="CWeb" value="${company.CWeb}" />
					</td>
				</tr>
				</table>
				
				<table title="项目信息" style="height: 20px; width:30%">
				<tr>
					<td style="text-align: right;padding-right: 30px">
<!-- 					<span style="color: green" id="good"></span>
					<span style="color: red" id="bad"></span> -->
					<button id="b" href="javascript:save()" style="color: black" >提交</button>
					<td style="padding-left: 30px"><input type="reset" ></a>
					</td>
				</tr>
			</table>
			
			</form>
		</div>
</body>
</html>
<script>

	$(function() {

		$("#b").click(function() {

			//alert();
			$.ajax({
				type : "POST",
				url : "updateCompanyInfo",
				data : $('#companyInfo').serialize(),// 你的formid
				dataType : "text",
				success : function(result) {
				if(result=="true"){
					alert("保存成功");//返回字符串没有生效
				}else if(result=="false"){
					alert("保存失败");
				}
				}
			});
		});
	});
</script>